import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';

import 'package:get/get.dart';

import '../../../style/app_colors.dart';
import '../../../style/widget_style.dart';
import '../../../widgets/AppHeader.dart';
import '../../../widgets/CommonWidgets.dart';
import '../controllers/offline_models_controller.dart';

class OfflineModelsView extends GetView<OfflineModelsController> {
  const OfflineModelsView({super.key});
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: SingleChildScrollView(
          child: Stack(
            children: [
              Container(
                child: SvgPicture.asset(
                  "assets/images/header_part_bg.svg",
                  width: Get.width,
                ),
              ),
              AppHeader.obtainHeaderWithoutRightPart('离线模型'),
              Container(
                width: Get.width,
                margin: EdgeInsets.only(top: 100.h),
                padding: EdgeInsets.all(20.w),
                child: Column(
                  children: [
                    Container(
                      height: 40.h,
                      decoration: BoxDecoration(
                        color: AppColors.swith_inactive_bg_color,
                        borderRadius: BorderRadius.circular(8), // Optional: add border radius
                      ),
                      child: TextField(
                        decoration: InputDecoration(
                          prefixIcon: Icon(Icons.search),
                          prefixIconConstraints:BoxConstraints.expand(width:18.w, height: 18.h),
                          hintText: '搜索语言',
                          hintStyle: AppStyleThemeData.HINT_TEXT_STYLE,
                          focusedBorder: InputBorder.none,
                          contentPadding: EdgeInsets.only(bottom: 5.h,left: 10.w),

                        ),

                      ),
                    ),
                    SizedBox(height: 16.h,),
                    Row(
                      children: [
                        Text('已下载', style: AppStyleThemeData.normal_bold,),
                      ],
                    ),
                    SizedBox(height: 8.h,),

                    Container(
                      padding: EdgeInsets.all(16.w),
                      decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(8),
                        boxShadow: [
                          CommonWidgets.getBoxShadow(),
                        ],// Optional: add border radius
                      ),
                      child: Column(
                        children: [
                          Row(
                            children: [
                              Text('乌克兰语',style: AppStyleThemeData.normal)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('简体中文(普通话)', style: AppStyleThemeData.linkStyle,),
                              Image.asset('assets/images/icon_language_flag_1.png',width: 24.w,height: 24.h)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('英语(美国)', style: AppStyleThemeData.normal),
                              Image.asset('assets/images/icon_language_flag_1.png',width: 24.w,height: 24.h)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('德语', style: AppStyleThemeData.normal)
                            ],
                          ),
                        ],
                      ),
                    ),
                    SizedBox(height: 20.h,),
                    Row(
                      children: [
                        Text('全部', style: AppStyleThemeData.normal_bold,),
                      ],
                    ),
                    SizedBox(height: 8.h,),

                    Container(
                      padding: EdgeInsets.all(16.w),
                      decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(8),
                        boxShadow: [
                          CommonWidgets.getBoxShadow(),
                        ],// Optional: add border radius
                      ),
                      child: Column(
                        children: [
                          Row(
                            children: [
                              Text('世界语言',style: AppStyleThemeData.normal)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('丹麦语', style: AppStyleThemeData.linkStyle,),
                              Image.asset('assets/images/icon_language_flag_1.png',width: 24.w,height: 24.h)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('乌克兰语', style: AppStyleThemeData.normal),
                              Image.asset('assets/images/icon_language_flag_1.png',width: 24.w,height: 24.h)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('乌兹别克语', style: AppStyleThemeData.normal)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('亿博语', style: AppStyleThemeData.normal)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('俄语', style: AppStyleThemeData.normal)
                            ],
                          ),
                          SizedBox(height: 17.h,),
                          CommonWidgets.getMyDivider(),
                          SizedBox(height: 17.h,),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('泰语', style: AppStyleThemeData.normal)
                            ],
                          ),
                        ],
                      ),
                    )

                  ],
                ),
              )
            ],
          ),
        )
    );
  }


}
